home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sprite 1984 - 1993
/
Sprite 1984 - 1993.iso
/
src
/
lib
/
c
/
unixSyscall
/
RCS
/
ftruncate.c,v
< prev
next >
Wrap
Text File
|
1991-12-10
|
2KB
|
136 lines
head 1.3;
branch ;
access ;
symbols sprited:1.3.1;
locks ; strict;
comment @ * @;
1.3
date 91.09.12.21.38.11; author mottsmth; state Exp;
branches 1.3.1.1;
next 1.2;
1.2
date 88.07.29.17.39.26; author ouster; state Exp;
branches ;
next 1.1;
1.1
date 88.06.19.14.31.19; author ouster; state Exp;
branches ;
next ;
1.3.1.1
date 91.12.10.15.48.40; author kupfer; state Exp;
branches ;
next ;
desc
@@
1.3
log
@ftruncate was returning Sprite ReturnStatus, not Unix errno
as it's supposed to.
@
text
@/*
* ftruncate.c --
*
* Procedure to map from Unix ftruncate system call to Sprite system call.
*
* Copyright 1986 Regents of the University of California
* All rights reserved.
*/
#ifndef lint
static char rcsid[] = "$Header: /sprite/src/lib/c/unixSyscall/RCS/ftruncate.c,v 1.2 88/07/29 17:39:26 ouster Exp Locker: mottsmth $ SPRITE (Berkeley)";
#endif not lint
#include "sprite.h"
#include "compatInt.h"
#include "fs.h"
#include <errno.h>
/*
*----------------------------------------------------------------------
*
* ftruncate --
*
* Procedure to map from Unix ftruncate system call to Sprite
* system call.
*
* Results:
* UNIX_SUCCESS is returned, or
* UNIX_ERROR with errno set appropriately.
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
int
ftruncate(fd, length)
int fd;
unsigned long length;
{
ReturnStatus status = SUCCESS;
status = Ioc_Truncate(fd, (int) length);
if (status == SUCCESS) {
return(UNIX_SUCCESS);
} else {
errno = Compat_MapCode(status);
return(UNIX_ERROR);
}
}
@
1.3.1.1
log
@Initial branch for Sprite server.
@
text
@d11 1
a11 1
static char rcsid[] = "$Header: /sprite/src/lib/c/unixSyscall/RCS/ftruncate.c,v 1.3 91/09/12 21:38:11 mottsmth Exp $ SPRITE (Berkeley)";
@
1.2
log
@Lint.
@
text
@d11 1
a11 1
static char rcsid[] = "$Header: ftruncate.c,v 1.1 88/06/19 14:31:19 ouster Exp $ SPRITE (Berkeley)";
d30 2
a31 1
* UNIX_SUCCESS is returned.
d44 9
a52 1
return(Ioc_Truncate(fd, (int) length));
@
1.1
log
@Initial revision
@
text
@d11 1
a11 1
static char rcsid[] = "$Header: ftruncate.c,v 1.2 87/06/25 17:20:22 brent Exp $ SPRITE (Berkeley)";
d43 1
a43 1
return(Ioc_Truncate(fd, length));
@